package org.ece3574.fallingbox;

import android.app.Activity;
import android.os.Bundle;
import android.view.Display;
import android.view.View;
import android.view.animation.Animation;
import android.view.animation.TranslateAnimation;
import android.widget.ImageView;

public class FallingboxActivity extends Activity {
	
	ImageView crate;
	Animation crateAnimation;
	
    /** Called when the activity is first created. */
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.falling_box);
        
        crate = (ImageView)findViewById(R.id.crate);
        
        crateAnimation = new TranslateAnimation(0,0,0,300);
        crateAnimation.setDuration(2000);
        crateAnimation.setFillAfter(true);
        crateAnimation.setRepeatCount(-1);
        crateAnimation.setStartOffset(5000);
        crate.setAnimation(crateAnimation);
        crate.setVisibility(View.VISIBLE);
        
    }

}